﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace MyChart
{
    /// <summary>
    /// 序列配置类。定义了序列在图表中呈现的相关属性。
    /// </summary>
    public class SeriesConfig
    {
        #region 字段

        private Color _color = new Color();
        private bool _showValues = true;
        private bool _showAnchors = true;
        private bool _isDashed = false;
        private SeriesRenderType _renderType = SeriesRenderType.Line;
        private YAxis _parentYAxis;

        #endregion

        #region 构造器

        /// <summary>
        /// 初始化 SeriesConfig 类
        /// </summary>
        public SeriesConfig()
        {
        }

        #endregion

        #region 属性

        /// <summary>
        /// 获取或设置序列展现时的图形颜色
        /// </summary>
        public Color Color
        {
            get { return _color; }
            set { _color = value; }
        }

        /// <summary>
        /// 获取或设置一个值，表示是否显示当前序列数据项的值
        /// </summary>
        public bool ShowValues
        {
            get { return _showValues; }
            set { _showValues = value; }
        }

        /// <summary>
        /// 获取或设置一个值，表示是否显示当前序列数据项值对应的坐标点
        /// </summary>
        public bool ShowAnchors
        {
            get { return _showAnchors; }
            set { _showAnchors = value; }
        }

        /// <summary>
        /// 获取或设置一个值，表示是否显示当前序列是否以虚线形式展现
        /// </summary>
        public bool IsDashed
        {
            get { return _isDashed; }
            set { _isDashed = value; }
        }

        /// <summary>
        /// 获取或设置一个值，表示是否显示当前序列的展现图形类型
        /// </summary>
        public SeriesRenderType RenderType
        {
            get { return _renderType; }
            set { _renderType = value; }
        }

        /// <summary>
        /// 获取或设置当前序列属于所对应的Y坐标轴
        /// </summary>
        public YAxis ParentYAxis
        {
            get { return _parentYAxis; }
            set { _parentYAxis = value; }
        }

        /// <summary>
        /// 实现不同的序列的鼠标提示不同
        /// </summary>
        public string ToolTextFormat { get; set; }
        /// <summary>
        /// 支持不同序列实现的点击事件不同
        /// </summary>
        public string OnClientClick { get; set; }
        #endregion
    }
}
